﻿namespace Entities.Enumeration {

    public class StockLocation {
        
        public static StockLocation China  = new StockLocation(0,  "China",  "中国");
        public static StockLocation Sydney = new StockLocation(1,  "Syndey", "悉尼");
        public static StockLocation Unknow = new StockLocation(99, "Unknow", "未知");

        public int Location { get; set; }
        public string Name  { get; set; }
        public string CName { get; set; }

        public StockLocation(int loc, string name, string cname) {
            Location = loc;
            Name     = name;
            CName    = cname;
        }

        public static StockLocation GetLocation(int location) {
            if (location == 0) {
                return China;
            }
            if (location == 1) {
                return Sydney;
            }
            return Unknow;
        }

    }
}